package com.yxdj.service.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yxdj.service.api.domain.ServiceDetail;
import com.yxdj.service.mapper.ServiceDetailMapper;
import com.yxdj.service.mapper.ServiceItemMapper;
import com.yxdj.service.service.ServiceDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 韩总
* @description 针对表【service_detail(服务详情表)】的数据库操作Service实现
* @createDate 2025-03-20 14:44:40
*/
@Service
public class ServiceDetailServiceImpl extends ServiceImpl<ServiceDetailMapper, ServiceDetail>
    implements ServiceDetailService{

    @Autowired
    private ServiceItemMapper serviceItemMapper;

    @Override
    public List<ServiceDetail> getPageList(ServiceDetail serviceDetail) {
        LambdaQueryWrapper<ServiceDetail> serviceDetailLambdaQueryWrapper = new LambdaQueryWrapper<>();
        serviceDetailLambdaQueryWrapper.eq(serviceDetail.getServiceItemId() != null, ServiceDetail::getServiceItemId, serviceDetail.getServiceItemId());
        List<ServiceDetail> serviceDetails = baseMapper.selectList(serviceDetailLambdaQueryWrapper);
        return serviceDetails;
    }
}




